#!/bin/sh
### BEGIN INIT INFO
# Provides:          xcvr-servd
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     rc.local
# Default-Stop:      0 1 6
# Short-Description: Daemon xcvr-servd
### END INIT INFO

# Author: Yencheng Lin <yencheng.lin@mic.com.tw>

DESC="Service script for /opt/xcvr-serv/xcvr-servd"
DAEMON=/opt/xcvr-serv/xcvr-servd

case "$1" in
  start)
    start-stop-daemon --start --exec $DAEMON
    ;;
  stop)
    start-stop-daemon --stop --name xcvr-servd
    ;;
  *)
    exit 1
    ;;
esac

exit 0
